package com.lyj.service.impl;

import com.lyj.mapper.DepartmentMapper;
import com.lyj.pojo.Department;
import com.lyj.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> findAllDept(Department dept) {
        return departmentMapper.findAllDept(dept);
    }

    @Override
    public Department findDeptById(Integer id) {
        return departmentMapper.findDeptById(id);
    }

    @Override
    public void updateDeptById(Department department) {
        departmentMapper.updateDeptById(department);
    }

    @Override
    public void addDepartment(Department department) {
        departmentMapper.addDepartment(department);
    }

    @Override
    public void deleteDeptById(Integer id) {

        departmentMapper.deleteDeptById(id);
    }
}
